import request from '@/utils/request'
/* 文章列表*/
export function getArticleList(data = {}) {
	return request({
		url: '/admin/article/lists',
		method: 'get',
		params: data
	})
}
/* 文章详情*/
export function getArticleInfo(data = {}) {
	return request({
		url: '/admin/article/detail',
		method: 'get',
		params: data
	})
}
/* 新增*/
export function addArticle(data = {}) {
	return request({
		url: '/admin/article/add',
		method: 'post',
		data
	})
}
/* 编辑*/
export function editArticle(data = {}) {
	return request({
		url: '/admin/article/edit',
		method: 'post',
		data
	})
}
/* 删除新闻*/
export function deleteArticle(data = {}) {
	return request({
		url: '/admin/article/delete',
		method: 'post',
		data
	})
}
/* 上下架新闻*/
export function changeArticle(data = {}) {
	return request({
		url: '/admin/article/on_or_off',
		method: 'post',
		data
	})
}

// 轮播图相关
export function getBarList(data = {}) {
	return request({
		url: '/admin/focus/lists',
		method: 'get',
		params: data
	})
}
// 新增轮播图
export function focusAdd(data = {}) {
	return request({
		url: '/admin/focus/add',
		method: 'post',
		data
	})
}
export function focusEdit(data = {}) {
	return request({
		url: '/admin/focus/edit',
		method: 'post',
		data
	})
}
export function focusDetail(data = {}) {
	return request({
		url: '/admin/focus/detail',
		method: 'get',
		params: data
	})
}
export function focusDelete(data = {}) {
	return request({
		url: '/admin/focus/delete',
		method: 'post',
		data
	})
}